<ion-view view-title="{{title}}" class="productdetail activityThree">
	<!--一定要手动加导航栏-->
	<ion-nav-bar>
		<ion-nav-back-button>
		</ion-nav-back-button>
	</ion-nav-bar>
	<ion-nav-buttons side="right">
		<button class="button button-clear" on-tap="openModal_share()"><img src="./img/guilin/common/icon_share@2x.png" class="shareImg"/></button>
	</ion-nav-buttons>

	<ion-content class="bg">
		<!--描述：商品图片轮播.tu-->
		<ion-slide-box delegate-handle="advs-handle" slide-interval="5000" show-pager="true">
			<ion-slide ng-repeat="img in detail.title_images">
				<img src="{{img.image}}" width="100%">
			</ion-slide>
		</ion-slide-box>
		
		<div class="list actDetail" ng-if="detail">
			<li class="item redItem">
				<div class="priceDiv">
					<span class="fh">￥</span>{{detail.price||detail.mktprice|currency:''}}
				</div>
				<!--疯狂团购、限时抢购-->
				<div class="saleDiv" ng-if="activitType=='1'||activitType=='3'">
					售出{{detail.count||0}}件
				</div>
				
				<!--限时拍卖，出价历史-->
				<div class="saleDiv" ng-if="activitType=='4'&&detail.act_logs" on-tap="onshow_productInfo()">
					{{detail.paimaiNum}}次出价
				</div>
				
				<!--秒杀专用，小屏幕才显示-->
				<div class="applyDiv" ng-if="activitType=='2'">
					<p class="orgPirce" ng-if="detail.price&&isBigWidth">{{detail.mktprice|currency:'￥'}}</p>
					<p class="orgPirce" ng-if="!isBigWidth" style="text-decoration: none;">中奖价{{detail.win_price|currency:'￥'}}</p>
					<p class="applyNum" ng-if="detail.count!=undefined">售出{{detail.count||0}}件</p>
				</div>
				
				<!--中奖价，秒杀专用，大屏幕才显示-->
				<div class="applyDiv" ng-if="activitType=='2'&&isBigWidth">
					<p class="orgPirce" style="text-decoration: none;">{{detail.win_price|currency:'￥'}}</p>
					<p class="applyNum">中奖价</p>
				</div>
				
				<div class="timeDiv">
					<p class="text">{{act_time_name}}{{detail.formate_time[0]}}天</p>
					<span class="num">{{detail.formate_time[1]}}</span><span class="pot">:</span><span class="num">{{detail.formate_time[2]}}</span><span class="pot">:</span><span class="num">{{detail.formate_time[3]}}</span>
				</div>
			</li>
			
			<li class="item goodsNameDiv" ng-if="activitType!='4'">
				{{detail.name}}
				<p class="spec">{{detail.spec_info}}</p>
				<p class="applyTime" ng-if="detail.act_end_time&&activitType=='4'">申请结束时间：{{detail.act_end_time*1000|date:"yyyy-MM-dd H:mm:ss"}}</p>
			</li>
			<!--疯狂团购会显示-->
			<li class="item tableItem" ng-if="detail.goods_specification[0].groupbuy_rule">
				<table>
					<thead>
						<tr>
							<td>目标件数</td>
							<td>发货时间</td>
							<td>价格(元)</td>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="rule in detail.goods_specification[0].groupbuy_rule">
							<td>{{rule.count}}</td>
							<td>{{rule.day}}天</td>
							<td>{{rule.promotion_price|currency:""}}</td>
						</tr>
					</tbody>
				</table>
			</li>
			
			<!--限时拍卖会显示-->
			<li class="item showPriceItem" ng-if="activitType=='4'">
				<div>
					<p>保证金：{{detail.pledge_price|currency:'¥'}}</p>
					<p>运费：{{detail.freight|currency:'¥'}}</p>
				</div>
				<div class="mt12">
					<p>起拍价：{{detail.start_price|currency:'¥'}}</p>
					<p>保留价：{{detail.fixed_price}}</p>
				</div>
			</li>
			
			<li class="item buyCountItem">
				<div class="left-zhang">
					<div class="add stable-bg" on-tap="goods_add()">+</div>
					<input type="number" ng-disabled="true" ng-model="input.goods_num" style="width: {{input.goods_num>10000?(input.goods_num+'').length*10:38}}px;"/>
					<div class="add" on-tap="goods_reduce()">-</div>
				</div>
				<!--拍卖-->
				<div class="addPriceDiv" ng-if="activitType=='4'">
					加价幅度：<span class="num">{{detail.amplitude|currency:'¥'}}</span>
				</div>
				
				<div class="addPriceDiv" ng-if="startBuyNum>1 || minBuyNum>1">
					<!--团购-->
					<p class='extendinfo' ng-if="startBuyNum>1 && activitType=='1'">  起购数：<span class="num">{{startBuyNum}}</span></p>
					<p class='extendinfo' ng-if="minBuyNum>1 ">  基数：<span class="num">{{minBuyNum}}</span></p>
				</div>
				<!--团购和拍卖不显示库存-->
				<div class="storeNumDiv" ng-if="activitType!='1' && activitType!='4'">
					库存：{{detail.store}}件
					<p class="maxBuy">最大可购买：{{detail.max_count}}</p>
				</div>
			</li>
			
			<li class="item ruleItem" on-tap="openModal_rule()">
				<img src="./img/guilin/other/icon_hdgz@2x.png" class="sjx"/>
				活动规则
				<img src="./img/guilin/common/icon_right@2x.png" class="jt"/>
			</li>
			
			<!--<li class="item ruleItem" ng-if="activitType=='4'" on-tap="openPopup_BZJrule()">
				<img src="./img/guilin/other/icon_hdgz@2x.png" class="sjx"/>
				保证金规则
				<img src="./img/guilin/common/icon_right@2x.png" class="jt"/>
			</li>-->
			
			<!--店铺信息-->
			<li class="item storeItem item-input" on-tap="onshow_first()">
				<img src="{{detail.image_place1.s_url}}" class="storeImg" />
				<div class="storeMiddle level">
					<p class="storeName">{{detail.store_name}}</p>
					<span class="storeKind">{{detail.store_kind}}</span>
					<div class="shop_grade grade{{detail.store_level}}" style="margin-left: -5px;"></div>
				</div>
				<div class="storeRight">
					<p ng-repeat="store_info in detail.store_info">
						{{store_info.name}}<span class="point">{{store_info.avg_point}}</span>
					</p>
				</div>
			</li>
			<li class="item pullItem">
				<img src="./img/guilin/common/icon_up@2x.png" />
				上拉查看图文详情
			</li>
		</div>

		<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="3%"></ion-infinite-scroll>
	</ion-content>

	<!--底部按钮，每个活动可能是不一样的，要注意区分-->
	<div class="bar bar-footer" ng-if="detail">
		<div class="row" ng-if="activitType!='4'">
			<div class="col" on-tap="onshow_first()">
				<img src="./img/guilin/other/idon_dp@2x.png" class="imgSize"/>
				<div class="titleText">店铺</div>
			</div>
			<div class="col" on-tap="openModal_customer()" ng-show="detail.flag_name!='转让'&&detail.flag_name!='租赁'">
				<img src="./img/guilin/other/icon_kefu@2x.png" class="imgSize"/>
				<div class="titleText">客服</div>
			</div>
			<div class="btn red" on-tap="submit()" ng-show="detail.invalid!=true&&detail.flag_name!='转让'&&detail.flag_name!='租赁'&&isshow==true">
				{{buyBtnText}}
			</div>
			<div class="bg-DDD btn" ng-show="detail.invalid!=true&&detail.flag_name!='转让'&&detail.flag_name!='租赁'&&isshow==false">{{btn_name}}</div>
		</div>
		
		<!--限时拍卖-->
		<div class="submitPrice" ng-if="activitType=='4'&&btn_name!='已结束'" on-tap="submitPrice()"><img src="./img/guilin/other/icon_tj@2x.png" />{{detail.is_price?"提交出价":"报名交保证金"}}</div>
	</div>
	
</ion-view>